var mongoose = require('mongoose');

mongoose.connect('mongodb://127.0.0.1:27017/lagou',{
  useUnifiedTopology: true,
  useNewUrlParser: true 
})

mongoose.connection.on('error', (error) => {
  console.log(error)
})
mongoose.connection.once('open', () => {
  console.log('open ...')
})

module.exports = mongoose;